#ifndef HAL4D13_H_
#define HAL4D13_H_

#include "isp_1362_regs.h"
#include "system.h"


typedef volatile struct
{
  int np_dmastatus;        // status register
  int np_dmareadaddress;   // read address
  int np_dmawriteaddress;  // write address
  int np_dmalength;        // length in bytes
  int np_dmareserved1;     // reserved
  int np_dmareserved2;     // reserved
  int np_dmacontrol;       // control register
  int np_dmareserved3;     // control register alternate
} np_dma;


void usb_1362_device_0_write(alt_16 addr);
void usb_1362_device_16_write(alt_16 addr,alt_16 data);
void usb_1362_device_32_write(alt_16 addr,alt_32 data);
alt_16 usb_1362_device_16_read(alt_16 addr);
alt_32 usb_1362_device_32_read(alt_16 addr);
void disable(void);
void enable(void);
#endif /*HAL4D13_H_*/
